package com.glsc.ngateway.common.api.platform.dto.user;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;
import java.util.Collections;
import java.util.Set;

@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class PlatformUserDto {

    private Long id;

    @Builder.Default
    private Integer enabled = 1;

    @Builder.Default
    private Integer deleted = 0;

    @ApiModelProperty(value = "【重要】username实是oa账号信息，比如zzp这种")
    private String username;

    private String password;

    @ApiModelProperty(value = "中文姓名")
    private String name;

    private String remark;

    @ApiModelProperty(value = "用户类型，1:内部用户,2:OA用户,3:系统用户,4:外包")
    private String userType;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "用户oa系统id")
    private String userid;

    @ApiModelProperty(value = "用户部门")
    private String userDepartment;

    @Transient
    private String departmentId;

    @Builder.Default
    private Set<String> roles = Collections.EMPTY_SET;


    @Transient
    private Set<UrlDto> urls;

    @Builder.Default
    @Transient
    private Integer disable = 0;

    private String department;


    private Set<String> auths;

    private String token;

    private String taskFreq;

    private String isBatch;

    private String taskFreqTime;

    private String prodId;

    private String prodGroupId;

    private String prodShortname;

    private String prodGroupName;

    private String attachmentFilename;
    private String attachmentType;
    private Long shiftDay;
    private String defualEmail;


    private String tryCode;

    private String authorization;

}
